﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using HA.MT3DMS.DomainLayer;
namespace HA.ModFlow.Controls.Converts
{
    class KineticCovert:IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            KineticRateReaction type = (KineticRateReaction)value;
            int index = 0;
            switch (type)
            {
                case KineticRateReaction.NONE :
                    index = 0;
                    break;
                case KineticRateReaction.FirstOrderIrreversibleReaction:
                    index = 1;
                    break;
            }
            return index;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            int index = (int)value;
            KineticRateReaction type=KineticRateReaction.NONE;
            switch (index)
            {
                case 0:
                    type = KineticRateReaction.NONE;
                    break;
                case 1:
                    type = KineticRateReaction.FirstOrderIrreversibleReaction;
                    break;
            }
            return type;
        }
    }
}
